<template>
	<view class="mainPage content" :style="{'padding-top': `${$store.state.safeArea.top || 0}px`, 'padding-bottom': `${$store.state.safeArea.bottom || 0}px`}">
		<public-head :title="title"></public-head>
		<view class="box">
			<u-field v-model="mobile" label="手机号" required maxlength="11" dir="rtl" type="number" placeholder="请填写持卡人手机号" placeholder-style="">
			</u-field>
		</view>
		<view class="but" @click="next">
			<button>提现</button>
		</view>
	</view>
</template>
<script>
var that
import publicHead from "@/components/publicHead/publicHead.vue"
export default {
	components: {
		publicHead
	},
	data() {
		return {
			title: "提现验证",
			mobile: '',
			code: '',
			codeText: '',
			timer: null,
			doctor_transferNum: '',
			upload_doctorbankNum: '',
			bank_id: ''
		}
	},
	onLoad(e) {
		that = this
		that.bank_id = e.bank_id
		that.doctor_transferNum = e.money
		that.upload_doctorbankNum = e.account
		console.log('获取用户账户与金额', e)
	},
	methods: {
		next() {
			that.$postAjax1('PetDoctor_Center_transfer', {
				bank_id: that.bank_id,
				bank_phone: that.mobile,
				cas_money: that.doctor_transferNum
			}, function (data) {
				uni.showToast({
					title: '提交成功',
					duration: 2000
				});
				that.timer = setTimeout(() => {
					// uni.redirectTo({
					// 	url:'./withdrawal'
					// })	
					uni.navigateBack({
						// delta: 2
					})
				}, 2000)
				console.log('提现成功')
			})
		},
	},
}
</script>
<style  scoped lang="scss">
.content {
	width: 100vw;
	height: 100vh;
	background: #f6f6f6;
	.box {
		background: #ffffff;
		padding: 30rpx;
	}
	.but {
		width: 100%;
		position: fixed;
		bottom: 200rpx;
		button {
			width: 90%;
			background: linear-gradient(219deg, #ff9331 0%, #fe7600 100%);
			border-radius: 8rpx;
			font-weight: 400;
			color: #ffffff;
		}
	}
}
</style>
